Allow binding to symbols in which-key-C-h-dispatch
authorJustin Burkett <justin@burkett.cc>
Fri, 26 Nov 2021 02:32:18 +0000 (21:32 -0500)
committerJustin Burkett <justin@burkett.cc>
Fri, 26 Nov 2021 02:32:18 +0000 (21:32 -0500)
Fixes #326

which-key.el

index 1daebc9424156a11395fa72b56ab1ccfcc87164f..e55197ee4a05cd00dac1d92512a85d9be491abdb 100644 (file)
@@ -2379,7 +2379,10 @@ prefix) if `which-key-use-C-h-commands' is non nil."
                                      " 1..9"
                                      which-key-separator "digit-arg"))
                                    'face 'which-key-note-face)))
-                  (key (string (read-key prompt)))
+                  (key (let ((key (read-key prompt)))
+                         (if (numberp key)
+                             (string key)
+                           (vector key))))
                   (cmd (lookup-key which-key-C-h-map key))
                   (which-key-inhibit t))
              (if cmd (funcall cmd key) (which-key-turn-page 0)))))))